package com.yansu.own.controller;

import com.yansu.own.common.dtos.ResponseResult;
import com.yansu.own.service.ArticleFreemarkerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 文章管理
 */
@Slf4j
@RestController
@RequestMapping("/sysArticle")
@Api(tags = "文章管理")

public class SysArticleController {

    @Autowired
    private ArticleFreemarkerService articleFreemarkerService;

    /**
     * 合成模板测试
     */
    @ApiOperation("合成模板测试")
    @GetMapping("/createArticleHtml")
    public ResponseResult getBannerTable(Long id, String content) {
        articleFreemarkerService.buildArticleToMinIO(id, content);
        return ResponseResult.okResult();
    }
}
